import axios from "axios";

const instance = axios.create({
  baseURL: "http://biubiu0002.tpddns.cn:8081",
  timeout: 10000,
});

export const get = async (url: string, params = {}) => {
  const response = await instance.get(url, { params });
  return response.data;
};

export const post = async (url: string, data = {}) => {
  const response = await instance.post(url, data);
  return response.data;
};

export default {
  get,
  post,
};
